using Universal.Application.Contracts.Common;
using Universal.Application.Contracts.Dto.User;

namespace Universal.Application.Repositories;

/// <summary>
/// 用户服务接口
/// </summary>
public interface IUserService
{
    /// <summary>
    /// 个人中心
    /// </summary>
    Task<dynamic> GetCurrentUserProfileAsync(Guid userId);

    /// <summary>
    /// 修改个人中心
    /// </summary>
    Task<dynamic> UpdateUserProfileAsync(Guid userId, UpdateUserProfileDto updateUserProfileDto);

    /// <summary>
    /// 分页获取用户列表
    /// </summary>
    Task<ApiResponse<PagedResult<UsersViewDto>>> GetUsersPagedAsync(int pageIndex, int pageSize);

    /// <summary>
    /// 模糊查询用户
    /// </summary>
    /// <param name="query">查询条件</param>
    /// <returns>查询结果</returns>
    Task<ApiResponse<PagedResult<UsersViewDto>>> QueryUsersAsync(UserQueryDto query);

    /// <summary>
    /// 启用用户
    /// </summary>
    Task<dynamic> EnableUserAsync(Guid userId);

    /// <summary>
    /// 禁用用户
    /// </summary>
    Task<dynamic> DisableUserAsync(Guid userId);

    /// 新增用户
    /// </summary>
    Task<dynamic> AddUserAsync(AddEditUserDto addEditUserDto);

    /// <summary>
    /// 编辑用户
    /// </summary>
    Task<dynamic> EditUserAsync(Guid id, AddEditUserDto addEditUserDto);

    /// <summary>
    /// 删除用户
    /// </summary>
    Task<dynamic> DeleteUserAsync(Guid id);

    /// <summary>
    /// 更新头像
    /// </summary>
    Task<dynamic> UpdateAvatarAsync(Guid userId, string avatarUrl);

    /// <summary>
    /// 分配角色
    /// </summary>
    Task<dynamic> AssignRolesAsync(AssignRolesDto assignRolesDto);

    /// <summary>
    /// 移除角色
    /// </summary>
    Task<dynamic> RemoveRolesAsync(AssignRolesDto assignRolesDto);

    /// <summary>
    /// 用户界面用于模糊查询时看到的角色
    /// </summary>
    /// <param name="queryRoleDto"></param>
    /// <returns></returns>
    Task<dynamic> QueryRoleView();

}